<template>
  <div class="scope">
    <div class="title">更多数据</div>
    <div class="card-wrapper">
      <div v-for="(item, i) in items" class="card" :key="i" @click="goPage(item)">
        <img class="icon" :src="item.icon" mode="widthFix" alt="">
      </div>
    </div>
  </div>
  

</template>

<script>
// import { openWebView, global, format } from "@ls/mp-utils";
// import { uploadSteps } from "@/utils/utils";
// import { getTargetStep, getTargetSport, queryUricAcidBlockData, queryUricKetoneBlockData } from './api';


export default {
  components: {},
  props: {

  },
  
  emits: ['goPage'],
  data() {
    return {
      items: [
        { name: '家人互联', icon: 'https://pics.leshiguang.com/vpage/2024/01/21/d6b73e5cec364fea80bcaa5d6f584420.png', page: '/pagesMy/my/family/family'},
        { name: '人体分析', icon: 'https://pics.leshiguang.com/vpage/2024/01/21/17fa32f79fe44860980db17aedbcca79.png', page: '/subpackage/bodyFatScale/bodyFatScale'},
      ],
    };
  },
  methods: {
    goPage(item) {
      console.warn('goPage')
      this.$emit('goPage', item);

    }
  },
};
</script>
<style lang="scss">

.scope {
  border-radius: 20upx;
  background: white;
  box-shadow: 0px 2px 24px rgba(0, 0, 0, 0.04);
  margin: 24upx;
  padding: 16px;
  .title {
    color: #222;
    font-weight: bold;
    font-size: 18px;
    margin-right: 16upx;
    margin-bottom: 8px;
  }
}
.card-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding-top: 20upx;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20rpx;
  .card {
    flex: 1;
    background: #FFFFFF;
    box-shadow: 0px 2px 24px rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    position: relative;
    .icon {
      width: 100%;
    }
    .info {
      font-size: 32px;
      color: rgba(34, 34, 34, 1);
      font-weight: bold;
      margin-bottom: 2px;
    }
    .date {
      padding: 2px 0 17px 0;
      font-size: 12px;
      color: rgba(34, 34, 34, 0.5);
    }
  }
}
</style>
